
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 2
 * @Author : WangRuoyu 
 * @Date : 2023/5/14 15:47
 */

#include "iostream"
#include "algorithm"

using namespace std;

int salary[7] = {0, 1500, 4500, 9000, 35000, 55000, 80000};
int rate[7] = {3, 10, 20, 25, 30, 35, 45};

int money(int x) {
    int all = x;
    x -= 3500;
    int res = 0;
    for (int i = 0; i < 6; ++i) {
        if (x <= salary[i + 1]) {
            res += (x - salary[i]) / 100 * rate[i];
            break;
        } else {
            res += (salary[i + 1] - salary[i]) / 100 * rate[i];
        }
    }
    if (x > 80000) {
        res += (x - 80000) / 100 * 45;
    }
    return all - res;
}

int main() {
    int output;
    cin >> output;
    if (output <= 3500) {
        cout << output << endl;
    } else {
        for (int i = output / 100 + 1; i <= 2000; ++i) {
            if (output == money(i * 100)) {
                cout << i * 100 << endl;
                break;
            }
        }
    }
    return 0;
}